<template>
  <div id="centerRight1">
    <div class="bg-color-black">
      <div class="d-flex pt-2 pl-2 d-title">
        <span>
          <icon name="chart-line"
                class="text-icon"></icon>
        </span>
        <div class="d-flex">
          <span class="fs-xl text mx-2">数据动态日志</span>
        </div>
      </div>
      <div class="body-box">
        <vue-seamless-scroll class="dv-scr-board"
                             :data="listData"
                             :class-option="defaultOption">
          <ul class="ul-scoll">
            <li v-for="(item, index) in listData"
                :key='index'>
              <div>{{item.name}}</div>
              <div>原组织 : {{item.old_organize}}</div>
              <div>现组织 : {{item.new_organize}}</div>
              <span class="date">{{item.create_time}}</span>
            </li>
          </ul>
        </vue-seamless-scroll>
      </div>
    </div>
  </div>
</template>

<script>
import vueSeamlessScroll from 'vue-seamless-scroll'
export default {
  data () {
    return {
    }
  },
  components: {
    vueSeamlessScroll
  },
  mounted () {

  },
  computed: {
    defaultOption () {
      return {
        step: 0.2, // 数值越大速度滚动越快
        limitMoveNum: 2, // 开始无缝滚动的数据量 this.dataList.length
        hoverStop: true, // 是否开启鼠标悬停stop
        direction: 1, // 0向下 1向上 2向左 3向右
        openWatch: true, // 开启数据实时监控刷新dom
        singleHeight: 0, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
        singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
        waitTime: 1000 // 单步运动停止的时间(默认值1000ms)
      }
    },
    listData () {
      let arr = []
      this.info.forEach(m => {
        arr.push(m)
      });
      // let c = {
      //   header: ['姓名', '原组织', '现组织'],
      //   data: arr,
      //   rowNum: 7, //表格行数
      //   headerHeight: 35,
      //   headerBGC: '#0f1325', //表头
      //   oddRowBGC: '#0f1325', //奇数行
      //   evenRowBGC: '#171c33', //偶数行
      //   index: false,
      //   columnWidth: [],
      //   align: ['center']
      // }
      return arr
    }
  },
  methods: {},
  props: {
    info: {
      type: Array
    }
  }
}
</script>

<style lang="scss" scoped>
$box-height: 470px;
$box-width: 510px;
#centerRight1 {
  padding: 16px;
  padding-top: 20px;
  height: $box-height;
  width: $box-width;
  border-radius: 5px;
  .bg-color-black {
    height: $box-height - 30px;
    border-radius: 10px;
  }
  .text {
    color: #c3cbde;
  }
  .body-box {
    overflow: hidden;
    .dv-scr-board {
      width: $box-width;
      height: $box-height - 70px;
      li {
        padding: 15px;
        font-size: 16px;
        >div{
          margin-bottom: 10px;
        }
      }
      li:nth-of-type(odd) {
        background: rgb(10, 39, 50);
      }
      li:nth-of-type(even) {
        background: rgb(0, 59, 81);
      }
    }
  }
}
</style>
